-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add coercion of arguments to @wrap
#991
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #991 +/- ##
==========================================
+ Coverage 75.75% 75.77% +0.02%
==========================================
Files 51 51
Lines 4190 4203 +13
==========================================
+ Hits 3174 3185 +11
- Misses 1016 1018 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks exactly like what I was hoping for, great :-)
@ThomasBreuer any concerns, comments, questions about this |
I have no objections. If I understand the idea right then we can (should?) use the new feature in Oscar as follows. |
But we could change the wrapper for Size to require a GAPObj. In fact there is a ton of wrappers we could do that. I was simply lazy when setting up most of them. |
Looking at the list in This change would not help us to get an automatic indirection from Oscar objects to underlying GAP objects. Writing |
We may be looking at different subsets of the wrappers? Because my view is that the majority would be safe to use That said, as I already suggested in the feature request leading to this: we could also add code to deal with GAP.Obj and GAP.GapInt. Indeed, we just have to add a few more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Perhaps a test could be added?
@ThomasBreuer I agree that the drawback of this code is that things become ever so slightly more "magical" and harder to understand, but I feel it is worth it here. What do you think?
I added something similar as your suggestions as comments in the different cases.
There already is a doctest coercing a julia string to a GAP string. For tests for |
Co-authored-by: Max Horn <[email protected]>
Resolves the first part of oscar-system/Oscar.jl#3720.
Due to the way this is now implemented, it is very easy to adapt it for similar type annotations like
GapInt
.Currently also contains #992 to make the testsuite run on nightly. This PR can be rebased once #992 is merged.